Optimal. Leaf size=137 \[ -\frac {1}{3 a x^3}+\frac {b}{2 a^2 x^2}-\frac {b^2-a c}{a^3 x}-\frac {\left (b^4-4 a b^2 c+2 a^2 c^2\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a^4 \sqrt {b^2-4 a c}}-\frac {b \left (b^2-2 a c\right ) \log (x)}{a^4}+\frac {b \left (b^2-2 a c\right ) \log \left (a+b x+c x^2\right )}{2 a^4} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 137, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.318, Rules used = {1599, 723, 814,
648, 632, 212, 642} \begin {gather*} \frac {b \left (b^2-2 a c\right ) \log \left (a+b x+c x^2\right )}{2 a^4}-\frac {b \log (x) \left (b^2-2 a c\right )}{a^4}-\frac {b^2-a c}{a^3 x}+\frac {b}{2 a^2 x^2}-\frac {\left (2 a^2 c^2-4 a b^2 c+b^4\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a^4 \sqrt {b^2-4 a c}}-\frac {1}{3 a x^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 632
Rule 642
Rule 648
Rule 723
Rule 814
Rule 1599
Rubi steps
\begin {align*} \int \frac {1}{x^2 \left (a x^2+b x^3+c x^4\right )} \, dx &=\int \frac {1}{x^4 \left (a+b x+c x^2\right )} \, dx\\ &=-\frac {1}{3 a x^3}+\frac {\int \frac {-b-c x}{x^3 \left (a+b x+c x^2\right )} \, dx}{a}\\ &=-\frac {1}{3 a x^3}+\frac {\int \left (-\frac {b}{a x^3}+\frac {b^2-a c}{a^2 x^2}+\frac {-b^3+2 a b c}{a^3 x}+\frac {b^4-3 a b^2 c+a^2 c^2+b c \left (b^2-2 a c\right ) x}{a^3 \left (a+b x+c x^2\right )}\right ) \, dx}{a}\\ &=-\frac {1}{3 a x^3}+\frac {b}{2 a^2 x^2}-\frac {b^2-a c}{a^3 x}-\frac {b \left (b^2-2 a c\right ) \log (x)}{a^4}+\frac {\int \frac {b^4-3 a b^2 c+a^2 c^2+b c \left (b^2-2 a c\right ) x}{a+b x+c x^2} \, dx}{a^4}\\ &=-\frac {1}{3 a x^3}+\frac {b}{2 a^2 x^2}-\frac {b^2-a c}{a^3 x}-\frac {b \left (b^2-2 a c\right ) \log (x)}{a^4}+\frac {\left (b \left (b^2-2 a c\right )\right ) \int \frac {b+2 c x}{a+b x+c x^2} \, dx}{2 a^4}+\frac {\left (b^4-4 a b^2 c+2 a^2 c^2\right ) \int \frac {1}{a+b x+c x^2} \, dx}{2 a^4}\\ &=-\frac {1}{3 a x^3}+\frac {b}{2 a^2 x^2}-\frac {b^2-a c}{a^3 x}-\frac {b \left (b^2-2 a c\right ) \log (x)}{a^4}+\frac {b \left (b^2-2 a c\right ) \log \left (a+b x+c x^2\right )}{2 a^4}-\frac {\left (b^4-4 a b^2 c+2 a^2 c^2\right ) \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{a^4}\\ &=-\frac {1}{3 a x^3}+\frac {b}{2 a^2 x^2}-\frac {b^2-a c}{a^3 x}-\frac {\left (b^4-4 a b^2 c+2 a^2 c^2\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a^4 \sqrt {b^2-4 a c}}-\frac {b \left (b^2-2 a c\right ) \log (x)}{a^4}+\frac {b \left (b^2-2 a c\right ) \log \left (a+b x+c x^2\right )}{2 a^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 131, normalized size = 0.96 \begin {gather*} \frac {-\frac {2 a^3}{x^3}+\frac {3 a^2 b}{x^2}+\frac {6 a \left (-b^2+a c\right )}{x}+\frac {6 \left (b^4-4 a b^2 c+2 a^2 c^2\right ) \tan ^{-1}\left (\frac {b+2 c x}{\sqrt {-b^2+4 a c}}\right )}{\sqrt {-b^2+4 a c}}-6 \left (b^3-2 a b c\right ) \log (x)+3 \left (b^3-2 a b c\right ) \log (a+x (b+c x))}{6 a^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 157, normalized size = 1.15
method | result | size |
default | \(\frac {\frac {\left (-2 a b \,c^{2}+b^{3} c \right ) \ln \left (c \,x^{2}+b x +a \right )}{2 c}+\frac {2 \left (a^{2} c^{2}-3 a \,b^{2} c +b^{4}-\frac {\left (-2 a b \,c^{2}+b^{3} c \right ) b}{2 c}\right ) \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}}{a^{4}}-\frac {1}{3 a \,x^{3}}-\frac {-a c +b^{2}}{a^{3} x}+\frac {b \left (2 a c -b^{2}\right ) \ln \left (x \right )}{a^{4}}+\frac {b}{2 a^{2} x^{2}}\) | \(157\) |
risch | \(\frac {\frac {\left (a c -b^{2}\right ) x^{2}}{a^{3}}+\frac {b x}{2 a^{2}}-\frac {1}{3 a}}{x^{3}}+\frac {2 b \ln \left (x \right ) c}{a^{3}}-\frac {b^{3} \ln \left (x \right )}{a^{4}}+\left (\munderset {\textit {\_R} =\RootOf \left (\left (4 a^{5} c -a^{4} b^{2}\right ) \textit {\_Z}^{2}+\left (8 a^{2} b \,c^{2}-6 a \,b^{3} c +b^{5}\right ) \textit {\_Z} +c^{4}\right )}{\sum }\textit {\_R} \ln \left (\left (\left (6 a^{7} c -2 a^{6} b^{2}\right ) \textit {\_R}^{2}+\left (5 a^{4} b \,c^{2}-2 a^{3} b^{3} c \right ) \textit {\_R} +a^{2} c^{4}-2 a \,b^{2} c^{3}+b^{4} c^{2}\right ) x -a^{7} b \,\textit {\_R}^{2}+\left (-a^{5} c^{2}+3 a^{4} b^{2} c -a^{3} b^{4}\right ) \textit {\_R} +2 a^{2} b \,c^{3}-3 a \,b^{3} c^{2}+b^{5} c \right )\right )\) | \(233\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 445, normalized size = 3.25 \begin {gather*} \left [\frac {3 \, {\left (b^{4} - 4 \, a b^{2} c + 2 \, a^{2} c^{2}\right )} \sqrt {b^{2} - 4 \, a c} x^{3} \log \left (\frac {2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c - \sqrt {b^{2} - 4 \, a c} {\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) - 2 \, a^{3} b^{2} + 8 \, a^{4} c + 3 \, {\left (b^{5} - 6 \, a b^{3} c + 8 \, a^{2} b c^{2}\right )} x^{3} \log \left (c x^{2} + b x + a\right ) - 6 \, {\left (b^{5} - 6 \, a b^{3} c + 8 \, a^{2} b c^{2}\right )} x^{3} \log \left (x\right ) - 6 \, {\left (a b^{4} - 5 \, a^{2} b^{2} c + 4 \, a^{3} c^{2}\right )} x^{2} + 3 \, {\left (a^{2} b^{3} - 4 \, a^{3} b c\right )} x}{6 \, {\left (a^{4} b^{2} - 4 \, a^{5} c\right )} x^{3}}, -\frac {6 \, {\left (b^{4} - 4 \, a b^{2} c + 2 \, a^{2} c^{2}\right )} \sqrt {-b^{2} + 4 \, a c} x^{3} \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) + 2 \, a^{3} b^{2} - 8 \, a^{4} c - 3 \, {\left (b^{5} - 6 \, a b^{3} c + 8 \, a^{2} b c^{2}\right )} x^{3} \log \left (c x^{2} + b x + a\right ) + 6 \, {\left (b^{5} - 6 \, a b^{3} c + 8 \, a^{2} b c^{2}\right )} x^{3} \log \left (x\right ) + 6 \, {\left (a b^{4} - 5 \, a^{2} b^{2} c + 4 \, a^{3} c^{2}\right )} x^{2} - 3 \, {\left (a^{2} b^{3} - 4 \, a^{3} b c\right )} x}{6 \, {\left (a^{4} b^{2} - 4 \, a^{5} c\right )} x^{3}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.35, size = 136, normalized size = 0.99 \begin {gather*} \frac {{\left (b^{3} - 2 \, a b c\right )} \log \left (c x^{2} + b x + a\right )}{2 \, a^{4}} - \frac {{\left (b^{3} - 2 \, a b c\right )} \log \left ({\left | x \right |}\right )}{a^{4}} + \frac {{\left (b^{4} - 4 \, a b^{2} c + 2 \, a^{2} c^{2}\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{\sqrt {-b^{2} + 4 \, a c} a^{4}} + \frac {3 \, a^{2} b x - 2 \, a^{3} - 6 \, {\left (a b^{2} - a^{2} c\right )} x^{2}}{6 \, a^{4} x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.60, size = 524, normalized size = 3.82 \begin {gather*} \ln \left (2\,a\,b^4\,\sqrt {b^2-4\,a\,c}-2\,b^6\,x-2\,a\,b^5+2\,b^5\,x\,\sqrt {b^2-4\,a\,c}+11\,a^2\,b^3\,c-13\,a^3\,b\,c^2+2\,a^3\,c^3\,x+a^3\,c^2\,\sqrt {b^2-4\,a\,c}-17\,a^2\,b^2\,c^2\,x+12\,a\,b^4\,c\,x-5\,a^2\,b^2\,c\,\sqrt {b^2-4\,a\,c}-8\,a\,b^3\,c\,x\,\sqrt {b^2-4\,a\,c}+7\,a^2\,b\,c^2\,x\,\sqrt {b^2-4\,a\,c}\right )\,\left (\frac {b^3}{2\,a^4}-\frac {b^2\,\sqrt {b^2-4\,a\,c}}{2\,a^4}-\frac {b\,c}{a^3}+\frac {a^2\,c^2\,\sqrt {b^2-4\,a\,c}}{4\,a^5\,c-a^4\,b^2}\right )+\ln \left (2\,a\,b^5+2\,b^6\,x+2\,a\,b^4\,\sqrt {b^2-4\,a\,c}+2\,b^5\,x\,\sqrt {b^2-4\,a\,c}-11\,a^2\,b^3\,c+13\,a^3\,b\,c^2-2\,a^3\,c^3\,x+a^3\,c^2\,\sqrt {b^2-4\,a\,c}+17\,a^2\,b^2\,c^2\,x-12\,a\,b^4\,c\,x-5\,a^2\,b^2\,c\,\sqrt {b^2-4\,a\,c}-8\,a\,b^3\,c\,x\,\sqrt {b^2-4\,a\,c}+7\,a^2\,b\,c^2\,x\,\sqrt {b^2-4\,a\,c}\right )\,\left (\frac {b^3}{2\,a^4}+\frac {b^2\,\sqrt {b^2-4\,a\,c}}{2\,a^4}-\frac {b\,c}{a^3}-\frac {a^2\,c^2\,\sqrt {b^2-4\,a\,c}}{4\,a^5\,c-a^4\,b^2}\right )+\frac {\frac {x^2\,\left (a\,c-b^2\right )}{a^3}-\frac {1}{3\,a}+\frac {b\,x}{2\,a^2}}{x^3}+\frac {b\,\ln \left (x\right )\,\left (2\,a\,c-b^2\right )}{a^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________